package com.fhz.module_mine;

import androidx.lifecycle.LiveData;

import com.fhz.core_lib.api.UserApi;
import com.fhz.core_lib.entity.LoggedInUser;
import com.fhz.core_lib.mvvm.IModel;
import com.fhz.core_lib.utils.ApiResponse;
import com.fhz.core_lib.utils.RetrofitFactory;

/**
 * 时间:2021/11/16
 *
 * @author msfeng
 * 简述: TODO
 */
public class MineModel implements IModel {
    public  LiveData<ApiResponse<String>> getQiNiuToken(){
        UserApi userApi = RetrofitFactory.getRetrofitFactory().create(UserApi.class);
        return userApi.getQiNiuToken();

    }

    //更新头像
    public LiveData<ApiResponse<LoggedInUser>> updateUser(String nickname , String headImg){
        UserApi userApi = RetrofitFactory.getRetrofitFactory().create(UserApi.class);
        return userApi.updateUser(nickname,headImg);
    }

}
